<?php
/*

PHP functions for integrating JSpeex-based voice tools into Moodle.
(c) 2006 Dan Stowell. Released under the GNU Public Licence (GPL).

The Java part of this library uses code from other authors -
see the copyrights.txt for more details.

*/


function submitspeech_postlet_applet($language, $height,$endpage, $filefieldname='userfile'){
  global $CFG;

  $cookie = htmlspecialchars($_SERVER['HTTP_COOKIE']);
  $code =  <<<ENDHTMLFRAGMENT
<applet name="VoxForge.org Speech Submission Application" width ="950" height =$height mayscript="mayscript"
      code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);">
 <param name="codebase"  value="http://read.voxforge1.org/r0_1_7/"/>
 <param name="archive"  value="speechrecorder.jar"/>
 <param name="type"  value="application/x-java-applet;version=1.7"/>
 <param name="scriptable"  value="true"/>
 <param name="destination" value="http://read.voxforge1.org/r0_1_7/javaUploadServer.php"/>
 <param name="endpage"  value="$endpage"/>
 <param name="cookie"  value="$cookie"/>
 <param name="language"  value="$language"/>
<table style="background-color: rgb(255, 195, 1);" border="1" height="24" width="550"><tbody><tr><td> The VoxForge Speech Submission Applet should appear here. Please see the VoxForge <a href="http://www.voxforge.org/home/read2/java" color="ffffff">Java Troubleshooting Guide</a> to determine if you have Java installed on your PC - this is required in order to use the audio recorder.<br></td></tr></tbody></table>

 </applet>
ENDHTMLFRAGMENT;
  return $code;
}




?>
